﻿<%@page contentType="text/vnd.wap.wml; charset=utf-8"%>
<%@ page import="java.io.*"%>
<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.text.*"%>
<%@ page import="common.*"%> 
<%@ page import="wapbean.*"%>

<?xml version="1.0" encoding="utf-8"?>   
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org//DTD//wml_1.1.xml">   
<wml>
<%     // String Pro=(String)session.getAttribute("ProviderID");  
       // System.out.println("ProProProPro="+Pro); 
        String name=(String)session.getAttribute("name"); 
        String Byname=(String)session.getAttribute("Byname");  
    	String purl = (String) session.getAttribute("p");
        ContentFactory Fac= new ContentFactory();
//        WapcategoryFactory Fac1 = new WapcategoryFactory();  
//        SecondUrl second=new SecondUrl();
        Vector vc = Fac.getMobilemodelBean();      
      boolean find = false;
       String MobileName=null;
	if (vc != null && !vc.isEmpty()) {
		int n = vc.size();
	//	System.out.println("nnnnnn=" + n);
		//循环获取url
		//String prid=null;
		for (int j = 1; j < n; j++) {
			MobilemodelBean ab = (MobilemodelBean) vc.elementAt(j);
			String description = ab.getDescription();
			  MobileName=ab.getMobileName();
			//prid = ab.getProviderID();
			
			String[] p = description.split(";");
		//	System.out.println("pppppp=" + p);
			int k;
			//判断当前机型是否包含访问中带的机型----------------begin
				for ( k = 0; k < p.length; k++) { 
					if (purl.equals(p[k])) { 
						find = true;
		    	//System.out.println("获取到url=" + purl);
					  break;   
					}
				}
			//判断当前机型是否包含访问中带的机型----------------end
			if(find){
				break;  
			}

	   }
	   // System.out.println("MobileName=" + MobileName); 
	   //for 循环结束
	   
	   //-------------------------------begin
	   				
			//判断当前url是否与访问url相等----------------begin
			//判断是否获取到对应url--------------begin 
			if(!find){//没找到
			//如果没有找到对应机型，但是url又不为空，则跳转到雅维28
				  purl="qxm787";    
		         
			//	 System.out.println("pgggggggggggggggggggggggggggggggggggg=" + find);
			//	  System.out.println("pgggggggggggggggggggggggggggggggggggg=" + purl);
			}else{//找到了对应的机型，如果没有内容，则跳转到维护页面
				if(vc == null || vc.isEmpty()){
		    //  System.out.println("ggggg=" + find);   
				%>
	    		 <jsp:forward page="wappages/anc.jsp"></jsp:forward>
	    		<% 
	    		 }else{
	    		//	  System.out.println("ffffffffffff=" + find); 
	    			  System.out.println("game3.0=" + purl);    
	    		 }  
			}
		}
	   //----------------------------------end    
	             NewFactory newF= new NewFactory();  
	             MobilemodelBean Mobilemodel = newF.getmobilemodelDescription(purl);   
	    	      String  MobileModelID=Mobilemodel.getMobileModelID();
	    	      String  ProviderID=Mobilemodel.getProviderID();
	    	 //     System.out.println("mobileModelid=" + MobileModelID);
	    	 //     System.out.println("providerid=" + ProviderID);
	    	       Vector newvc = newF.getWapcategory(MobileModelID);
	    	       WapcategoryFactory Fac1 = new WapcategoryFactory();
	    	       
	%> 
<!--<card id="card1" title="乐游-<%//=pb.getName()%>专区">            -->
<card id="card1" title="乐游网">            
<p align="left">

 <img src="/game3.0/img/logo.png" alt=""/>     
	<br />
<!--<a href="http://wap.leyoou.cn/game3.0/StoryServlet1?CategoryID=67&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>"> 圈子：编织炫.丽生活</a><br/>-->
<%@ include file="includes/video_top.jsp"%><!-- 精彩视频 -->
<%@ include file="includes/book.jsp" %><!-- 精彩图书 -->
<%@ include file="includes/shop_navi.jsp" %><!--商城 -->
<%@ include file="includes/shop_hot.jsp" %><!--商城 -->
<!--<a href="/game3.0/ShiPinServlet?purl=<%=purl%>">更多视频搜索</a><br/> -->
<!--<a href="/game3.0/StoryServlet?CategoryID=70&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">中国移动G客G拍</a><br/> -->
<!--<a href="http://wap.leyoou.cn/game3.0/wappages/hjpc.jsp?purl=<%=purl%>">幻姬内测评测</a><br/>  
<a href="http://wap.leyoou.cn/game3.0/wappages/hjgc.jsp?purl=<%=purl%>">幻姬开始盛大公测</a><br/> -->                
<!--<a href="http://wap.leyoou.cn/game3.0/StoryServlet?CategoryID=69&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">龙英雄</a><br/>      -->
	<%//if(MobileName.equals("28")){           
	//System.out.println("MobileName=*===="+MobileName);        
	%><%if(purl.equals("htk8")){%>
	欢迎进入全触摸世界！<br />
	<%} %>
	<!-- <a href="http://wap.leyoou.cn/game3.0/StoryServlet1?CategoryID=000&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>"> 卓阅电子书II </a><br/> 
	  <a href="http://wap.leyoou.cn/game2.0/resources/10/28/zuoyue_28_v1.0.0.jad"> 卓阅电子书 </a><br/>--> 
	<%// }else if(MobileName.equals("25")||MobileName.equals("k25")){%>
	 <!--  <a href="http://wap.leyoou.cn/game3.0/StoryServlet1?CategoryID=000&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>"> 卓阅电子书II </a><br/> 
	   <a href="http://wap.leyoou.cn/game2.0/resources/10/25/zuoyue_25_v1.0.0.jad"> 卓阅电子书 </a><br/> -->  
	 <%// }     %>
	            <% if(newvc!=null){  
                   int r=newvc.size();   
                   for(int q=0;q<r;q++){
                   Allbean bea=(Allbean)newvc.elementAt(q);  
                    %>
                    <%if(bea.getCategoryTypeID().equals("2")){ %> 
                    
                    <%if(bea.getCategoryID().equals("39")){//如果不是彩铃专栏，则显示栏目 %> 
 		            <%out.println(bea.getTitle());%><br/>
 		            <%}else{ %>
 		            <%out.println(bea.getTitle());%><br/>
 		            <%} %>
 		            <% 
 		            Vector ver5 = newF.getSubWapcategory(bea.getCategoryID());
 		            
		            if(ver5!=null){
                    int g=ver5.size(); 
                    
                    for(int s=0;s<g;s++){
                    Allbean bea5=(Allbean)ver5.elementAt(s);    
                    %>
                    <%//out.println(bea5.getCategoryID()+"----"+bea5.getActionPage().indexOf("211.137.86.73"));%>
                    <%
                   if(bea5.getActionPage().indexOf("211.137.86.73")<0){ //如果检索不到彩铃地址，则执行默认程序
                   if(s<g-1){
                   %>
                    <a href="/game3.0/wappages/gameList.jsp?CategoryID=<%=bea5.getCategoryID()%>&amp;MobileModelID=<%=MobileModelID%>&amp;ProviderID=<%=ProviderID%>&amp;purl=<%=purl%>"><%out.println(bea5.getTitle());%> </a>|
                   <%
                  }else{
                   %>
                    <a href="/game3.0/wappages/gameList.jsp?CategoryID=<%=bea5.getCategoryID()%>&amp;MobileModelID=<%=MobileModelID%>&amp;ProviderID=<%=ProviderID%>&amp;purl=<%=purl%>"><%out.println(bea5.getTitle());%> </a>
                   <%
                  }
                  }else{//如果是彩铃地址，则独立处理
                 %> 
                 *<a href="<%=bea5.getActionPage()%>m=game3.0/<%=purl%>"><%out.println(bea5.getTitle());%></a>
                 <% }
                  // if(s==ver5.size()-1){
                  //   out.println("<br/>");     
                  //    }
                     } }%>
                    <%
                    }else if (bea.getCategoryTypeID().equals("5")){ 
                    %> 
                    <% if((bea.getCategoryID().equals("64"))||(bea.getCategoryID().equals("62"))||(bea.getCategoryID().equals("63"))||(bea.getCategoryID().equals("66"))){%>  
                    <a href="<%=bea.getActionPage()%>"> <% out.println(bea.getTitle()); %> </a> 
                    <%} else{%>
                    <a href="<%=bea.getActionPage()%>?purl=<%=purl%>"> <% out.println(bea.getTitle()); %> </a> 
                    <%}}
                    else if (bea.getCategoryTypeID().equals("12")) {%> 
              <a href="/game3.0/wappages/gameList.jsp?CategoryID=<%=bea.getCategoryID()%>&amp;MobileModelID=<%=MobileModelID%>&amp;ProviderID=<%=ProviderID%>&amp;purl=<%=purl%>">
		    <%out.println(bea.getTitle());%> </a> 
		    <%
             } 
                    
              else if(bea.getCategoryID().equals("16")){%>
              <jsp:include page="includes/video_center.jsp"/><!-- 精彩视频 -->
              <%out.println(bea.getTitle()); %>   
              <%}else{
              out.println(bea.getTitle());
              } %>
              <br/>
                     <%            
	                 Vector ver4;
   	               if(bea.getCategoryTypeID().equals("1")){  
   	               %>
<!--                   <a href="/game3.0/StoryServlet?CategoryID=68&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">免流量精彩视频下载</a><br/>-->
<!--                   <a href="/game3.0/ShiPinServlet?purl=<%=purl%>">更多视频搜索</a><br/>  -->
					<%
   	               Vector ver6 = Fac1.getWapcategory(bea.getCategoryID());
   	                   if(ver6!=null){
                       int h=ver6.size(); 
                   for(int t=0;t<h;t++){
                   Allbean bea6=(Allbean)ver6.elementAt(t); 
                   %>
                   <a href="/game3.0/WapcategoryServlet?CategoryID=<%=bea6.getCategoryID()%>&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;ActionPage=<%=bea6.getActionPage()%>&amp;m=<%=purl%>"><%out.print(bea6.getTitle());%></a> <br/>
                   <% }}
                   if(!bea.getCategoryID().equals("16")){  
                    ver4 = newF.getMobilemodelContentlist(bea.getCategoryID(),MobileModelID);
					}else{ 
					ver4 = newF.getMobilemodelContentlistredian(bea.getCategoryID(),MobileModelID);
					}
   	                if(ver4!=null){  
                    int a=ver4.size(); 
              
                    for(int t=0;t<a;t++){
                    Allbean bea4=(Allbean)ver4.elementAt(t);  
                   
            	 %> 
 
		<!--  <a href="/game3.0/wappages/contentgameview.jsp?CategoryID=<%=bea4.getCategoryID()%>&amp;MobileModelID=<%=MobileModelID%>&amp;ProviderID=<%=ProviderID%>&amp;contentId=<%=bea4.getContentId()%>&amp;purl=<%=purl%>"><%out.println(bea4.getTitle());%></a> <br />  -->
		 <a href="/game3.0/wappages/contentgameview.jsp?CategoryID=<%=bea.getCategoryID()%>&amp;contentId=<%=bea4.getContentId()%>&amp;MobileModelID=<%=MobileModelID%>&amp;ProviderID=<%=ProviderID%>&amp;purl=<%=purl%>&amp;ContentResourceID=<%=bea4.getContentResourceID()%>&amp;cpId=<%=bea4.getCpId()%>&amp;submitCode=<%=bea4.getSubmitCode()%>&amp;gameresourceid=<%=bea4.getGameResourceID()%>"> 
	<%=bea4.getTitle()%></a><br />          
		  <%}}} %> <%}} %>   
	 <!-- <a href="/game3.0/wappages/mobilemodelname.jsp?ProviderID=<%//=Pro%>&amp;Name=<%=name%>&amp;Byname=<%=Byname%>">返回</a><br />         
	  <a href="wappages/deraign1.jsp?purl=<%=purl%>">游戏问题解决专栏</a><br /> --> 
<!--	    <a href="/game3.0/StoryServlet?CategoryID=68&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">免流量精彩视频下载</a><br/>-->
<!--	    <a href="/game3.0/ShiPinServlet?purl=<%=purl%>">更多视频搜索</a><br/> -->

<!--	 <a href="/game3.0/StoryServlet?CategoryID=70&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">中国移动G客G拍</a><br/>     -->
<!--	    <a href="http://wap.leyoou.cn/game3.0/StoryServlet?CategoryID=69&amp;mobileModelId=<%=MobileModelID%>&amp;purl=<%=purl%>&amp;MobileName=<%=MobileName%>">龙英雄</a><br/>         -->

	<jsp:include page="includes/video_bottom.jsp"/>	   	
<!--	【<a href="wappages/helpgame.jsp?purl=<%=purl%>">客服咨询</a>】<br /> -->
	leyoou.cn 京ICP备09030014号 
	

	</p>
</card>
</wml>